package com.gzz.orchid.context.infrastructure.definition;

/**
 * 支付费用
 * @author higmd
 */
public enum PaymentFee implements Fee {
    //public abstract double calculateFee(double amount);

    Credit_Card {
        @Override
        public double calculateFee(double amount) {
            return amount * 0.05;
        }
    },
    Debit_Card {
        @Override
        public double calculateFee(double amount) {
            return amount * 0.03;
        }
    },
    PayPal {
        @Override
        public double calculateFee(double amount) {
            return amount * 0.01;
        }
    };
}
interface Fee {
    double calculateFee(double amount);
}